package com.ea.eadp.nexus.test.pageDefinition.console;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;

public class TosPage extends ConsoleBasePage {

	public TosPage(WebDriver driver) {
		super(driver, TosPage.class, "readAccept");
	}
	
	public void acceptTOS() {
        if (!driver.findElement(By.id("readAccept")).isSelected()) {
            this.sendControllerKey('A');
        }
        this.sendControllerKey(Keys.DOWN);
        this.sendControllerKey('A');
	}
	
	public void declineTOS() {
        if (driver.findElement(By.id("readAccept")).isSelected()) {
            this.sendControllerKey('A');
        }
		sendControllerKey(Keys.DOWN);
        this.sendControllerKey('A');
	}

    public void exitTOS() {
        this.sendControllerKey('B');
    }
}

